import request from "@/js/request";
import qs from "qs";

export function uploadImg(data) {
    return request({
        url: `${process.env.VUE_APP_T100_API}/file/uploadT100FileList`,
        method: "post",
        headers: {
            "content-type": "multipart/form-data"
        },
        data: data.fd,
        params: {
            ...data.params,
            t: Math.random()
        }
    });
}

export function uploadImgApi(data) {
    return request({
        url: process.env.VUE_APP_T100_API + `/admin/t100pic/addT100pic`,
        method: "post",
        headers: {
            "Content-Type": "application/json"
        },
        data
    });
}

export function t100UploadImg(data) {
    return request({
        url: process.env.VUE_APP_T100_API + `/wtopprd/ws/r/awsp920`,
        method: "post",
        headers: {
            "Content-Type": "application/json"
        },
        data
    });
}
